﻿using MangoMes.MVC.Commands;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

namespace MangoMes.MVC.Controllers
{
    /// <summary>
    /// 生产
    /// </summary>
    public class TranslationController : Controller
    {
        private readonly IpAddressesConfig _ipAddressesConfig;

        public TranslationController(IOptions<IpAddressesConfig> ipAddressesConfig)
        {
            _ipAddressesConfig = ipAddressesConfig.Value;
        }
        public IActionResult Index()
        {
            return View();
        }
        /// <summary>
        /// 生产工单
        /// </summary>
        /// <returns></returns>
        public IActionResult ProductionWorkOrders()
        {
            ViewBag.FoundationWrite = _ipAddressesConfig.FoundationWrite;
            ViewBag.FoundationRead = _ipAddressesConfig.FoundationRead;
            return View();
        }
        /// <summary>
        /// 预览
        /// </summary>
        /// <returns></returns>
        public IActionResult PreviewView()
        {
            ViewBag.FoundationWrite = _ipAddressesConfig.FoundationWrite;
            ViewBag.FoundationRead = _ipAddressesConfig.FoundationRead;
            ViewBag.MVCIp = _ipAddressesConfig.MVCIp;
            return View();
        }
        /// <summary>
        /// 待检任务
        /// </summary>
        /// <returns></returns>
        public IActionResult ToBeInspected()
        {
            ViewBag.FoundationWrite = _ipAddressesConfig.FoundationWrite;
            ViewBag.FoundationRead = _ipAddressesConfig.FoundationRead;
            ViewBag.MVCIp = _ipAddressesConfig.MVCIp;
            return View();
        }
        /// <summary>
        /// 库存
        /// </summary>
        /// <returns></returns>
        public IActionResult Inventory()
        {
            ViewBag.FoundationWrite = _ipAddressesConfig.FoundationWrite;
            ViewBag.FoundationRead = _ipAddressesConfig.FoundationRead;
            ViewBag.MVCIp = _ipAddressesConfig.MVCIp;
            return View();
        }
    }
}
